PPdesinger.prototype.onlySaveForm = function(){

	var myObj = moveobjectcfz.now_Object;
	if(!myObj.hasCreateForm())
		return;
		if(this.mulSelectItemId.length!=0){	
			mourseMoveObject.isCanSelect = true;
			moveobjectcfz.deselect(true,e);
		}
		var tttss = '<?xml version="1.0" encoding="UTF-8"?>'+myObj.getAllItemData();
		alert(tttss);
		var returnFlag = true;
		if(myObj.linstenersFlag.beforeSaveFlag == true)
		{//beforeSave  保存前监听事件
			returnFlag = myObj.linsteners.beforeSave(cfz_saveXml,cfz_saveHtmlEditor);
		}
		if(returnFlag!=false)
		{
			document.getElementById("form_name").value = myObj.ffName;
			document.getElementById("form_content").value = tttss;
			document.getElementById("newForm_").submit();
		}
	
};


//字符串替换　参数:源字串  替换字串 替换后的字串
PPdesinger.prototype.replacestr = function (source, obj, target)
{
    var reg = new RegExp(obj,"g");
    return(source.replace(reg, target));
};
PPdesinger.prototype.getAllItemData = function()
{
	var myObj = moveobjectcfz.now_Object;
	var xmlDoc;// = this.createXml('<form formwidth="794" formheight="1123"></form>');
	if(myObj.useFormTab.flag==false)
	{
		
		var title_ = (Ext.getCmp("_newform_id").title);
		var width_ = (Ext.getCmp("_newform_id").getWidth());
		var height_ =(Ext.getCmp("_newform_id").getHeight());
		xmlDoc = this.createXml('<form title="'+title_+'"  formwidth="'+width_+'"  formheight="'+height_+'"></form>');
		for(var i=0; i <myObj.itemIdArr.length;i++)
		{
				var item = xmlDoc.createElement("item");
				for(var j in eval("myObj.allTypeItem."+moveobjectcfz.now_Object.itemTypeArr[i]))
				{
					if(moveobjectcfz.now_Object.itemTypeArr[i]=="htmleditor"&&j=="i_value")
					{
						var i_value = Ext.getCmp(moveobjectcfz.now_Object.itemIdArr[i]).getValue();
						i_value = moveobjectcfz.now_Object.replacestr(i_value,"'","&#39"); 
						item.setAttribute(j,i_value);
					}
					else if(eval("moveobjectcfz.now_Object.allItemProperty.useType."+moveobjectcfz.now_Object.itemTypeArr[i])=="noId"&&j=="i_items")
					{
						var i_value = Ext.getCmp(moveobjectcfz.now_Object.itemIdArr[i]).items;
						var i_valuearr = "[";
						for(var jj =0;jj<i_value.length;jj++)
						{
							var myjson = Ext.getCmp(moveobjectcfz.now_Object.itemIdArr[i]).get(jj);
							var myjson1 = {};
							myjson1.boxLabel = (myjson.boxLabel);
							myjson1.name = $("#"+moveobjectcfz.now_Object.itemIdArr[i]).attr("i_code");
							myjson1.columnWidth = (myjson.columnWidth);
							i_valuearr = i_valuearr + (moveobjectcfz.now_Object.JsonToString(myjson1))+",";
						}
						if("["!=i_valuearr)
							i_valuearr = i_valuearr.substring(0,i_valuearr.length-1)+"]";
						else
							i_valuearr = i_valuearr+"]";
						i_valuearr = moveobjectcfz.now_Object.replacestr(i_valuearr,"'","&#39"); 
						item.setAttribute(j,i_valuearr);
					}
					else
					{
						var i_value = $("#"+myObj.itemIdArr[i]).attr(j);
						i_value = moveobjectcfz.now_Object.replacestr(i_value,"'","&#39");
						item.setAttribute(j,i_value);
					}
						
					var lastChild = xmlDoc.getElementsByTagName("form")[0];
					lastChild.appendChild(item);
				}
		}
	}
	else
	{
		xmlDoc = this.createXml('<form></form>');
		for(var i=0;i<myObj.useFormTab.tabNumber;i++)
		{
			var  tabitem = xmlDoc.createElement("tabItem");
			var j = i+1;
			var title_ = (Ext.getCmp("_newform_id"+j).title);
			var width_ = (Ext.getCmp("_newform_id"+j).width_);
			var height_ =(Ext.getCmp("_newform_id"+j).height_);
			var tabSelectValue_ = (Ext.getCmp("_newform_id"+j).tabSelectValue_);
			tabitem.setAttribute("title",title_);
			tabitem.setAttribute("formwidth",width_);
			tabitem.setAttribute("formheight",height_);
			tabitem.setAttribute("tabSelectValue_",tabSelectValue_);
			var lastChild = xmlDoc.getElementsByTagName("form")[0];
			lastChild.appendChild(tabitem);
			for(var j=0;j<myObj.itemIdArrTab[i].length;j++)
			{
				var item = xmlDoc.createElement("item");
				for(var jj in eval("myObj.allTypeItem."+moveobjectcfz.now_Object.itemTypeArrTab[i][j]))
				{
					if(moveobjectcfz.now_Object.itemTypeArrTab[i][j]=="htmleditor"&&jj=="i_value")
					{
						var i_value = Ext.getCmp(moveobjectcfz.now_Object.itemIdArrTab[i][j]).getValue();
						i_value = moveobjectcfz.now_Object.replacestr(i_value,"'","&#39"); 
						item.setAttribute(jj,i_value);
					}
					else
					{
						var i_value = $("#"+myObj.itemIdArrTab[i][j]).attr(jj);
						i_value = moveobjectcfz.now_Object.replacestr(i_value,"'","&#39");
						item.setAttribute(jj,i_value);
					}
					var length_ = xmlDoc.getElementsByTagName("tabItem").length -1;
					var lastChild1 = xmlDoc.getElementsByTagName("tabItem")[length_];
					lastChild1.appendChild(item);
				}
			}
		}
	}
	var  sssss = this.xml2Str(xmlDoc);
	return sssss;
};
/**
 * 获取当前 页面的  项目路径
 * @return
 */
PPdesinger.prototype.getRootPath = function (){
	var strFullPath=window.document.location.href;
	var strPath=window.document.location.pathname;
	var pos=strFullPath.indexOf(strPath);
	var prePath=strFullPath.substring(0,pos);
	var postPath=strPath.substring(0,strPath.substr(1).indexOf('/')+1);
	return(prePath+postPath);
};

/**
 * 显示/隐藏标尺线
 * @return
 */
PPdesinger.prototype.show_biaochi_line = function  (){
	if(!this.hasCreateForm()) return;
	if(!this.is_show_bc)
	{
		  var tttt = (Ext.getCmp("_newform_id").getWidth()-28);
		  var aaaa = (Ext.getCmp("_newform_id").getHeight()-37);
	      $("#_newform_id  form").parent("div").css('display','inline-block');
	      $("#_newform_id  form").css('width',tttt);
	      $("#_newform_id  form").before("<div id='biaochi_x' class='x-panel-body x-form' style='height:17px;'></div>");
	      $("#biaochi_x").css("backgroundImage", "url('"+".."+"/ppdesinger/img/bc_x.bmp')"); //设置背景颜色
	      $("#_newform_id  form").before("<div id='biaochi_y' class='x-panel-body x-form' style='float:left;width:16px;'></div>");
	      $("#biaochi_y").css("backgroundImage", "url('"+".."+"/ppdesinger/img/bc_y2.bmp')"); //设置背景颜色
	     // if(isFormModify){
	    	 // 	$("#biaochi_x").css("backgroundImage", "url('"+this.getRootPath()+"/formdesigner/img/bc_x.bmp')"); //设置背景颜色
	      		//$("#biaochi_y").css("backgroundImage", "url('"+this.getRootPath()+"/formdesigner/img/bc_y2.bmp')"); //设置背景颜色
	    //  }
	      $("#biaochi_y").css('height',aaaa);
	      $("#_newform_id  form").css("float","right");
	      
	      document.getElementById("biaochi_x").onmousedown=function(e)
	      {
	    	  if(!e) e = window.event;
	    	  $("#_newform_id  form").append("<div id='biaochi_x_line' itemttype='biaochi_type' class='bbLineElement' style='position:absolute;width:"+(moveobjectcfz.maxLeft+28)+"px;height:1px;left:0px;top:50px;border-top:1px solid #00f;'></div>");
	      };
	      document.getElementById("biaochi_y").onmousedown = function(e) 
	      {
			  if(!e) e = window.event;
	    	  $("#_newform_id  form").append("<div id='biaochi_y_line' itemttype='biaochi_type' class='bbLineElement' style='position:absolute;width:1px;height:"+(moveobjectcfz.maxTop+37)+"px;left:50px;top:0px;border-left:1px solid #00f;'></div>");
	      };
	      this.is_show_bc = true;
	}
	else
	{
		$("#biaochi_x").remove();
		$("#biaochi_y").remove();
		$("div[class='bbLineElement']").remove();
		var tttt = Ext.getCmp("_newform_id").getWidth()-12;
	    $("#_newform_id  form").css('width',tttt);
	    this.is_show_bc = false;
	}
};



/**
 * 设置 字体 粗体
 * @param fontB
 * @return
 */
PPdesinger.prototype.changeFontB = function(fontB)
{
	for(var kk=0;kk<this.mulSelectItemId.length;kk++)
	{
		var i_type = $("#"+this.mulSelectItemId[kk]).attr("i_type");
		if(i_type=="htmleditor") continue;
		var useType = eval("this.allItemProperty.useType."+i_type);
		var colorJson = this.StringToJson($("#"+this.mulSelectItemId[kk]).attr("i_style"));
		colorJson.fontWeight = fontB;
		var colorString = this.JsonToString(colorJson);
		switch(useType)
		{
			case "noId":
				$("#"+this.mulSelectItemId[kk]+" label").css("font-weight",fontB);
				$("#"+this.mulSelectItemId[kk]).attr("i_style",colorString);
				break;
			case "selfCss":
				$("#"+this.mulSelectItemId[kk]).css('font-weight',fontB);
				$("#"+this.mulSelectItemId[kk]).attr("i_style",colorString);
				break;
			case "ceateDivinput":
				$("#"+this.mulSelectItemId[kk]).css('font-weight',fontB);
				$("#"+this.mulSelectItemId[kk]+" input").css('font-weight',fontB);
				$("#"+this.mulSelectItemId[kk]).attr("i_style",colorString);
				$("#"+this.mulSelectItemId[kk]+" input").attr("i_style",colorString);
				break;	
			case "ceateDivtextarea":
				$("#"+this.mulSelectItemId[kk]).css('font-weight',fontB);
				$("#"+this.mulSelectItemId[kk]+" textarea").css('font-weight',fontB);
				$("#"+this.mulSelectItemId[kk]).attr("i_style",colorString);
				$("#"+this.mulSelectItemId[kk]+" textarea").attr("i_style",colorString);
			case "inputDiv":
				$("#"+this.mulSelectItemId[kk]+" input").css('font-weight',fontB);
				$("#"+this.mulSelectItemId[kk]+" input").attr("i_style",colorString);
				break;
			default:
				break;
		}
	}
};

/**
 * 改变字体 family样式   宋体   黑体。。。。
 * @param cssvalue
 * @return
 */

PPdesinger.prototype.changeFontFamily = function (cssvalue)
{
	for(var kk=0;kk<this.mulSelectItemId.length;kk++)
	{
		var i_type = $("#"+this.mulSelectItemId[kk]).attr("i_type");
		if(i_type=="htmleditor") continue;
		var useType = eval("this.allItemProperty.useType."+i_type);
		var colorJson = this.StringToJson($("#"+this.mulSelectItemId[kk]).attr("i_style"));
		colorJson.fontFamily = cssvalue;
		var colorString = this.JsonToString(colorJson);
		switch(useType)
		{

			case "noId":
				$("#"+this.mulSelectItemId[kk]+" label").css("font-family",cssvalue);
				$("#"+this.mulSelectItemId[kk]).attr("i_style",colorString);
				break;
			case "selfCss":
				$("#"+this.mulSelectItemId[kk]).css('font-family',cssvalue);
				$("#"+this.mulSelectItemId[kk]).attr("i_style",colorString);
				break;
			case "ceateDivinput":
				$("#"+this.mulSelectItemId[kk]).css('font-family',cssvalue);
				$("#"+this.mulSelectItemId[kk]+" input").css('font-family',cssvalue);
				$("#"+this.mulSelectItemId[kk]).attr("i_style",colorString);
				$("#"+this.mulSelectItemId[kk]+" input").attr("i_style",colorString);
				break;	
			case "ceateDivtextarea":
				$("#"+this.mulSelectItemId[kk]).css('font-family',cssvalue);
				$("#"+this.mulSelectItemId[kk]+" textarea").css('font-family',cssvalue);
				$("#"+this.mulSelectItemId[kk]).attr("i_style",colorString);
				$("#"+this.mulSelectItemId[kk]+" textarea").attr("i_style",colorString);
			case "inputDiv":
				$("#"+this.mulSelectItemId[kk]+" input").css('font-family',cssvalue);
				$("#"+this.mulSelectItemId[kk]+" input").attr("i_style",colorString);
				break;
			default:
				break;
		}
	}
};

/**
 * 改变颜色  包括 字体颜色，线颜色，背景颜色等等
 * @param color
 * @return
 */
PPdesinger.prototype.changeColor = function (color)
{
	for(var kk=0;kk<this.mulSelectItemId.length;kk++)
	{
		
		var i_type = $("#"+this.mulSelectItemId[kk]).attr("i_type");
		if(i_type=="htmleditor") continue;
		var useType = eval("this.allItemProperty.useType."+i_type);
		var colorJson = this.StringToJson($("#"+this.mulSelectItemId[kk]).attr("i_style"));
		switch(useType)
		{
			case "noId":
				$("#"+this.mulSelectItemId[kk]+" label").css("color",color);
				colorJson.color = "#"+color;
				var colorString = this.JsonToString(colorJson);
				$("#"+this.mulSelectItemId[kk]).attr("i_style",colorString);
				break;
			case "selfCss":
				$("#"+this.mulSelectItemId[kk]).css("color",color);
				colorJson.color = "#"+color;
				var colorString = this.JsonToString(colorJson);
				$("#"+this.mulSelectItemId[kk]).attr("i_style",colorString);
				break;	
			case "ceateDivinput":
				$("#"+this.mulSelectItemId[kk]).css("color",color);
				$("#"+this.mulSelectItemId[kk]+" input").css("color",color);
				colorJson.color =  "#"+color;
				var colorString = this.JsonToString(colorJson);
				$("#"+this.mulSelectItemId[kk]).attr("i_style",colorString);
				$("#"+this.mulSelectItemId[kk]+" input").attr("i_style",colorString);
				break;	
			case "ceateDivtextarea":
				$("#"+this.mulSelectItemId[kk]).css("color",color);
				$("#"+this.mulSelectItemId[kk]+" textarea").css("color",color);
				colorJson.color =  "#"+color;
				var colorString = this.JsonToString(colorJson);
				$("#"+this.mulSelectItemId[kk]).attr("i_style",colorString);
				$("#"+this.mulSelectItemId[kk]+" textarea").attr("i_style",colorString);
				break;
			case "inputDiv":
				$("#"+this.mulSelectItemId[kk]+" input").css("color",color);
				colorJson.color =  "#"+color;
				var colorString = this.JsonToString(colorJson);
				$("#"+this.mulSelectItemId[kk]+" input").attr("i_style",colorString);
				break;
			case "self":
				$("#"+this.mulSelectItemId[kk]).css("borderColor",color);
				colorJson.borderColor =  "#"+color;
				var colorString = this.JsonToString(colorJson);
				$("#"+this.mulSelectItemId[kk]).attr("i_style",colorString);
				break;
			case "selfColor":
				$("#"+this.mulSelectItemId[kk]).css("backgroundColor",color);
				colorJson.backgroundColor =  "#"+color;
				var colorString = this.JsonToString(colorJson);
				$("#"+this.mulSelectItemId[kk]).attr("i_style",colorString);
				break;
			default:
				break;
		}
	}
};

/**
 * 改变字体大小  包括 label textfield 等等
 * @param fontsize
 * @return
 */
PPdesinger.prototype.changeFontSize = function(fontsize)
{
	for(var kk=0;kk<this.mulSelectItemId.length;kk++)
	{
		var i_type = $("#"+this.mulSelectItemId[kk]).attr("i_type");
		if(i_type=="htmleditor") continue;
		var useType = eval("this.allItemProperty.useType."+i_type);
		var colorJson = this.StringToJson($("#"+this.mulSelectItemId[kk]).attr("i_style"));
		colorJson.fontSize = fontsize;
		var colorString = this.JsonToString(colorJson);
		switch(useType)
		{
			case "noId":
				$("#"+this.mulSelectItemId[kk]+" label").css("font-size",fontsize);
				$("#"+this.mulSelectItemId[kk]).attr("i_style",colorString);
				break;
			case "selfCss":
				$("#"+this.mulSelectItemId[kk]).css('font-size',fontsize);
				$("#"+this.mulSelectItemId[kk]).attr("i_style",colorString);
				break;
			case "ceateDivinput":
				$("#"+this.mulSelectItemId[kk]).css("font-size",fontsize);
				$("#"+this.mulSelectItemId[kk]+" input").css("font-size",fontsize);
				$("#"+this.mulSelectItemId[kk]).attr("i_style",colorString);
				$("#"+this.mulSelectItemId[kk]+" input").attr("i_style",colorString);
				break;	
			case "ceateDivtextarea":
				$("#"+this.mulSelectItemId[kk]).css("font-size",fontsize);
				$("#"+this.mulSelectItemId[kk]+" textarea").css("font-size",fontsize);
				$("#"+this.mulSelectItemId[kk]).attr("i_style",colorString);
				$("#"+this.mulSelectItemId[kk]+" textarea").attr("i_style",colorString);
			case "inputDiv":
				$("#"+this.mulSelectItemId[kk]+" input").css('font-size',fontsize);
				$("#"+this.mulSelectItemId[kk]+" input").attr("i_style",colorString);
				break;
			default:
				break;
		}
	}
};

/**
 * 插入表格
 * @return
 */
PPdesinger.prototype.inserttabel = function()
{
	var myobj = this;
	if(!this.hasCreateForm()) return
		var in_table = new Ext.Window({
			title :'插入表格',
			width :200,
			height :300,
			layout :"absolute",
			modal :true,
			closeAction :'hide',
			items : [{
						xtype :"label",
						text :"行数",
						x :30,
						y :20,
						width :60
					},{
						xtype :"numberfield",
						x :70,
						id:'table_line',
						value:2,
						y :20,
						width :50
					},{
						xtype :"label",
						text :"列数",
						x :30,
						y :55,
						width :60
					},{
						xtype :"numberfield",
						x :70,
						value:2,
						id:'table_row',
						y :55,
						width :50
					},{
						xtype :"label",
						text :"行间距",
						x :30,
						y :90,
						width :60
					},{
						xtype :"numberfield",
						x :70,
						y :90,
						value:20,
						id:'table_line_space',
						width :50
					},{
						xtype :"label",
						text :"列间距",
						x :30,
						y :125,
						width :60
					},{
						xtype :"numberfield",
						x :70,
						y :125,
						value:20,
						id:'table_row_space',
						width :50
					},{
						xtype :"label",
						text :"x坐标",
						x :30,
						y :160,
						width :60
					},{
						xtype :"numberfield",
						x :70,
						y :160,
						value:0,
						id:'x_position_',
						width :50
					},{
						xtype :"label",
						text :"y坐标",
						x :30,
						y :195,
						width :60
					},{
						xtype :"numberfield",
						x :70,
						y :195,
						value:0,
						id:'y_position_',
						width :50
					},{
						xtype :"button",
						text :"确定",
						x :90,
						y :230,
						width:50,
						handler : function() {
							var lineNumber = Ext.getCmp('table_line').getValue();
							var rowNumber = Ext.getCmp('table_row').getValue();
							var lineSpace = Ext.getCmp('table_line_space').getValue();
						 	var rowSpace = Ext.getCmp('table_row_space').getValue();
						 	var xPosition = Ext.getCmp('x_position_').getValue();
						 	var yPosition = Ext.getCmp('y_position_').getValue();
						 	var rowSpaceSum = rowSpace*rowNumber;
						 	var lineSapceSum = lineSpace*lineNumber;
							for(var i=0;i<lineNumber+1;i++){
								var tempId = "linex"+myobj.itemIndex;
								myobj.itemIndex++;
								myobj.createOtherItem_byclick({
						        	i_id:tempId,
						        	i_type:"linex",
						        	i_x:xPosition,
					            	i_y:yPosition+lineSpace*i,
					            	i_width:rowSpaceSum,
					            	i_height:1});
							}
							for(var j=0;j<rowNumber+1;j++){
								var tempId = "liney"+myobj.itemIndex;
								myobj.itemIndex++;
								myobj.createOtherItem_byclick({
						        	i_id:tempId,
						        	i_type:"liney",
						        	i_x:xPosition+rowSpace*j,
					            	i_y:yPosition,
					            	i_width:1,
					            	i_height:lineSapceSum});
							}
							in_table.close();
						}
					}]
		});
		in_table.setPagePosition(350, 150);
		in_table.show();

};
       

/**
 * 判断是否创建form   创建 返回true  为创建 返回 false
 * @return
 */
PPdesinger.prototype.hasCreateForm = function()
{
	if ((Ext.getCmp("biaodangsheji").items.length == 0&&this.useFormTab.flag==false)||(this.useFormTab.flag==true&&Ext.getCmp("TabsPanel_cfz_pp").items.length==0) ) //表示表单有内容还没保存，提示确认信息
	{
        Ext.Msg.show({
		   title:'提示',
		   msg: '<b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;请先建立表单</b>',
		   buttons: {ok:'确定'},
		   icon: Ext.MessageBox.QUESTION,
		   maxWidth :300,
		   minWidth :300,
		   closable:false,
		   defaultTextHeight :100
		});
        return false;
    }
	else return true;
};

/**
 * 判断type，是否属于某一类型
 * @param type
 * @param alltype
 * @return
 */
PPdesinger.prototype.isTypeInTypearray =function  (type,alltype)
{
	for(var i=0;i<alltype.length;i++ in alltype)
	{
		if(type==alltype[i]) return true;
	}
	return false;
};


/**
 * 创建对象   obj为json形式 {i_id:111,i_type:343,........}
 * @param obj
 * @return
 */

PPdesinger.prototype.createOtherItem_byclick = function (obj,whichOnetoRender,firstCreate)
{
	
	var  formId_Tab_no = "_newform_id";
	if(this.useFormTab.flag)
		formId_Tab_no = (Ext.getCmp("TabsPanel_cfz_pp").getActiveTab().get(0).getId());
	eval("var i_style_ = "+obj.i_style);
	//i_style_.i_style  = '{color:"#000",fontSize:"12px", fontWeight:"normal",fontFamily:"宋体"}';
	switch (obj.i_type) 
	{
		case "linex" :
			var kk ="<div id='" +obj.i_id+"' class='bcLineElement'  style='position:absolute;left:"+obj.i_x+"px;top:"+obj.i_y+"px;border-top:"+obj.i_height+"px solid "+i_style_.borderColor+";width:"+obj.i_width+"px;height:1px;'></div>";
			break;
		case "liney" : 
			var kk = "<div id='" +obj.i_id+"' class='bcLineElementY'  style='position:absolute;left:"+obj.i_x+"px;top:"+obj.i_y+"px;border-left:"+obj.i_width+"px solid "+i_style_.borderColor+";width:1px;height:"+obj.i_height+"px;'></div>";
			break;
		case "imag":
			var kk = "<div id='"+obj.i_id+"' class='drsElement'  style='position:absolute;left:"+obj.i_x+"px;top:"+obj.i_y+"px;border:1px solid #000;width:"+obj.i_width+"px;height:"+obj.i_height+"px;display:block;'><img src='"+".."+"/ppdesinger/img/logo/"+obj.src+"' style='display:iinline-block;width:100%;height:100%;'/></div>";
			break;
		case "background":
			var kk = "<div id='"+obj.i_id+"' class='drsElement'  style='position:absolute;left:"+obj.i_x+"px;top:"+obj.i_y+"px;background-color:"+i_style_.backgroundColor+";width:200px;height:200px;display:block;cursor:move;'></div>";
			break;
		default:
			var  kk = this.createExtItem(firstCreate,obj);
	}
	if(this.useFormTab.flag)
	{
		var tabIndex = parseInt(Ext.getCmp("TabsPanel_cfz_pp").getActiveTab().tabIndexCfz)-1;
		this.itemIdArrTab[tabIndex].push(obj.i_id);
		this.itemTypeArrTab[tabIndex].push(obj.i_type);	
	}
	else
	{
		this.itemIdArr.push(obj.i_id);
		this.itemTypeArr.push(obj.i_type);
	}
	
	var elementObject = this;
	var useType = eval("this.allItemProperty.useType."+obj.i_type);
	switch (useType) 
	{
		case "self" :
		case "selfColor" : 
			$("#"+formId_Tab_no+"  form").append(kk);
			$("#"+obj.i_id).addClass("drsElement");
			$("#" + obj.i_id).get(0).style.zIndex =1;
			break;
		case "selfCss":
			Ext.getCmp(formId_Tab_no).add(kk);
			//this.windowPanel.render();
			eval(whichOnetoRender+".render()");
			for(var ii in i_style_)
				$("#"+obj.i_id).css(ii,i_style_[ii]);
			//Ext.getCmp("_newform_id").fireEvent("afterrender");
			$("#"+obj.i_id).addClass("drsElement");
			$("#" + obj.i_id).get(0).style.zIndex =1;
			$("#"+obj.i_id).dblclick( function (e) { 
				if(!e) e = window.event;
				var label_value = $("#"+obj.i_id).text();
				var label_left = $("#"+obj.i_id).css("left");
				var label_top = $("#"+obj.i_id).css("top");
				var label_width = $("#"+obj.i_id).css("width");
				var label_height = $("#"+obj.i_id).css("height");
				$("#"+obj.i_id).hide();
				$("#"+formId_Tab_no+"  form").append("<input id='label_text_id' type='text' value='"+label_value+"' style='position:absolute;left:"+label_left+";top:"+label_top+";width:"+label_width+";height:"+label_height+";'>");
				$("#label_text_id").focus();
				elementObject.isModifyLabel.flag = true;
				elementObject.isModifyLabel.labelId = obj.i_id;
			}); 
			break;
		case "textareaDiv":
		case "inputDiv":
			Ext.getCmp(formId_Tab_no).add(kk);
			eval(whichOnetoRender+".render()");
			$("#"+obj.i_id).parent().addClass("drsElement");
			break;
		case "ceateDivinput":
		case "ceateDivtextarea":
			Ext.getCmp(formId_Tab_no).add(kk);
			eval(whichOnetoRender+".render()");
			for(var ii in i_style_)
				$("#"+obj.i_id).css(ii,i_style_[ii]);
			$("#"+obj.i_id).addClass("drsElement");
			break;
		case "noId":
			Ext.getCmp(formId_Tab_no).add(kk);
			eval(whichOnetoRender+".render()");
			$("#"+obj.i_id).addClass("drsElement");
			$("#" + obj.i_id).css('overflow', 'visible');
			$("#"+obj.i_id).removeClass("x-fieldset");
			$("#"+obj.i_id).css("border","0px solid blue");
			for(var ii in i_style_)
				$("#"+obj.i_id+" label").css(ii,i_style_[ii]);
			break;
		case "button":
			Ext.getCmp(formId_Tab_no).add(kk);
			eval(whichOnetoRender+".render()");
			$("#"+obj.i_id).addClass("drsElement");
		default:break;
	}
	if(obj.i_type=="imag")
	{
		$("#" + obj.i_id).dblclick( function (a){
			elementObject.logoWindow.show();
	 	}); 
	}
	for(var tt in eval("this.allTypeItem."+obj.i_type))
	{
		$("#" + obj.i_id).attr(tt, obj[tt]);
		if(useType=="textareaDiv"||useType=="inputDiv")
		{
			$("#" + obj.i_id).parent().attr(tt, obj[tt]);
		}
		if(useType=="noId")
		{
			$("#"+obj.i_id).attr(tt, obj[tt]);
		}
	}
	if(useType=="textareaDiv"||useType=="inputDiv")
	{
		$("#" + obj.i_id).parent().mouseup(function(e){
			moveobjectcfz.now_Object.mouseUpRight(e,"item",$("#" + obj.i_id).parent().attr("id"));
	     });
	}
	else
	{
		$("#" + obj.i_id).mouseup(function(e){
			moveobjectcfz.now_Object.mouseUpRight(e,"item",obj.i_id);
	     });
	}
	if(this.linstenersFlag.afterCreateFlag == true)
	{
		this.linsteners.afterCreate(obj.i_id,obj.i_type,eval("this.allItemProperty.useType."+obj.i_type));
	}

};

/**
 * 新建表单 弹出的窗体
 * @return
 */
PPdesinger.prototype.newFormWindow = function(myObj) {
	if ((Ext.getCmp("biaodangsheji").items.length != 0&&this.useFormTab.flag==false)||(this.useFormTab.flag==true&&Ext.getCmp("TabsPanel_cfz_pp").items.length!=0) ) //表示表单有内容还没保存，提示确认信息
	{
		var flag = confirm("确认放弃当前页面的表单");
		if (flag == false) {
			return;
		}
	}
	var screenwidth =  window.screen.width-7;
	var screenHeight;
	if (Ext.isIE)
		screenHeight =  document.body.clientHeight - 130;
	else
		screenHeight =  document.body.clientHeight - 130;
	var form_win = new Ext.Window({
		title :'新建表单',
		width :300,
		height :350,
		layout :"absolute",
		modal :true,
		id :"_win",
		closeAction :'close',
		items : [{
					xtype :"label",
					text :"表单名称：",
					x :30,
					y :30,
					width :60
				},{
					xtype :"textfield",
					anchor :"",
					id :'_bdName',
					x :90,
					y :30,
					width :130
				},{
					xtype :"label",
					text :"纸张类型：",
					x :30,
					y :60,
					width :60
				},{
					xtype :"combo",
					anchor :"",
					id :'_bdtype',
					emptyText:'默认',
					x :90,
					y :60,
					width :130,
					triggerAction:'all',
		         	mode: 'local',
		         	store: new Ext.data.ArrayStore({
				        id: 0,
				        fields: [
				            'myId',
				            'displayText'
				        ],
				        data: [[0, '默认'],[1, 'A4'], [2, 'B5']]
				    }),
				    valueField: 'myId',
				    displayField: 'displayText',
				    listeners:{'select':function(a,b,c)
					{
						var form_type_value = Ext.getCmp('_bdtype').getRawValue();
						if(form_type_value=="B5"){
							Ext.getCmp('_dbLength').setValue(1240);
							Ext.getCmp('_bdHeigth').setValue(1754);
							Ext.getCmp('_dbLength').disable();
							Ext.getCmp('_bdHeigth').disable();
						}else if(form_type_value=="A4"){
							Ext.getCmp('_dbLength').setValue(794);
							Ext.getCmp('_bdHeigth').setValue(1123);
							Ext.getCmp('_dbLength').disable();
							Ext.getCmp('_bdHeigth').disable();
						}else{
							Ext.getCmp('_dbLength').setValue(screenwidth-5);
							Ext.getCmp('_bdHeigth').setValue(screenHeight);
							Ext.getCmp('_dbLength').disable();
							Ext.getCmp('_bdHeigth').disable();
						}
					}}
				},{
					xtype :"label",
					text :"表单宽度:",
					x :30,
					y :90,
					width :60
				},{
					xtype :"numberfield",
					anchor :"",
					x :90,
					emptyText:screenwidth,
					y :90,
					id :'_dbLength',
					width :130
				},{
					xtype :"label",
					text :"表单高度：",
					x :30,
					y :120
				},{
					xtype :"numberfield",
					anchor :"",
					x :90,
					emptyText:1123,
					y :120,
					id :'_bdHeigth',
					width :130
				},{
					xtype :"label",
					text :"页数：",
					x :30,
					y :150
				},{
					xtype :"numberfield",
					anchor :"",
					x :90,
					emptyText:1,
					y :150,
					id :'_bdTabNumber_',
					width :130
				},{
					xtype :"label",
					text :"表单颜色：",
					x :30,
					y :180
				},{
					xtype :"button",
					text:'FFFFFF',
					width:30,
					x :90,
					y :180,
					width :130,
					id:'biaodan_color',
					menu:{
						xtype:'colormenu',
						handler : function(cm, color)
						{
					    	if (typeof color == 'string') 
					    	{
					    		this.formColor = color;
					    		//Ext.getCmp("biaodan_color").setText(color);
					        }
				        }
					}
				
			},{
					xtype :"button",
					text :"确&nbsp;&nbsp;定",
					x :50,
					y :210,
					handler : function() {
						var length = Ext
						.getCmp('_dbLength').getValue();
						var heigth = Ext
						.getCmp('_bdHeigth').getValue();
						var _bdTabNumber_ = Ext
						.getCmp('_bdTabNumber_').getValue();
						myObj.howCreateForm = {
								isNewForm:true,
								isRedisplayForm:false,
								isModifyForm:false		
						};
						moveobjectcfz.maxLeft = length;
						moveobjectcfz.maxTop = heigth;
						moveobjectcfz.ffName = Ext.getCmp('_bdName').getValue();
						if(myObj.useFormTab.flag==false)
							myObj.newForm(Ext.getCmp('_bdName').getValue(), length, heigth);
						else
							myObj.newTabForm(Ext.getCmp('_bdName').getValue(), length, heigth,_bdTabNumber_);
					}
				},{
					xtype :"button",
					text :"取&nbsp;&nbsp消",
					x :150,
					y :210,
					handler : function() {
						form_win.close();
					}
				} ]
	});
	form_win.setPagePosition(350, 150);
	form_win.show();
};





PPdesinger.prototype.newTabForm = function (title, width, height,tabIndex,xmlValue,htmlEditorValue,whichOnetoRender)
{
	this["TabsPanel"].removeAll();
	var TabNumber = tabIndex;
	var xmlDoc ;
	var formWidth = width;
	var formHeight = height;
	var tabSelectValue_ = "行方式";
	var iii = parseInt(TabNumber);
	if(this.howCreateForm.isModifyForm||this.howCreateForm.isRedisplayForm)
	{
		xmlDoc = this.createXml(xmlValue);
		//formHeight = parseInt(xmlDoc.getElementsByTagName("form")[0].getAttribute("formheight"));
		//formWidth = parseInt(xmlDoc.getElementsByTagName("form")[0].getAttribute("formwidth"));
		TabNumber = xmlDoc.getElementsByTagName("tabItem").length;
		
	}
	if(this.howCreateForm.isNewForm||this.howCreateForm.isModifyForm)
	{
		var propsGrid = this.createPropsGrid(title,width,height);
		Ext.getCmp('attrPanel').add(propsGrid);
	}
	for(var j =0;j<TabNumber;j++)
	{
		this.itemIdArrTab[j] = new Array();
		this.itemTypeArrTab[j] =new Array();		
	}
	this.itemIndex = 0;
	for(var i=1;i<=parseInt(TabNumber);i++)
	{
		if(this.howCreateForm.isModifyForm||this.howCreateForm.isRedisplayForm)
		{
			title = xmlDoc.getElementsByTagName("tabItem")[i-1].getAttribute("title");
			this.ffName = title;
			formHeight = parseInt(xmlDoc.getElementsByTagName("tabItem")[i-1].getAttribute("formheight"));
			formWidth = parseInt(xmlDoc.getElementsByTagName("tabItem")[i-1].getAttribute("formwidth"));
			tabSelectValue_ = xmlDoc.getElementsByTagName("tabItem")[i-1].getAttribute("tabSelectValue_");
		}
		this.useFormTab.tabNumber = i;
		var form = new Ext.form.FormPanel({
			id :'_newform_id'+i, //表单id
			title :title, //表单的title值根据输入的值
			frame :true,
			labelAlign :'right',
			labelWidth :'auto',
			//collapsible :true,
			plugins: new Ext.ux.CellFieldDropZone(this),
			autoScroll :true,
			layout :"absolute",
			defaultType :'textfield',
			width :formWidth, //表单的宽度
			height :formHeight,  //表单的高度   
			tabSelectValue_ : tabSelectValue_,
			width_:formWidth,
			height_:formHeight
		});//form
		this["TabsPanel"].add({
        title: '第'+i+"页" ,
        iconCls: 'tabs',
		id:"tabSunId"+i,
		tabIndexCfz:i,
		items:[form],
		closable:true
       }).show();
		$("#_newform_id"+i+"  form").css("backgroundImage", "url('"+".."+"/ppdesinger/img/10.png')"); //设置背景颜色
		$("#_newform_id"+i+"  form").css("backgroundColor", this.formColor);
		$("#_newform_id"+i+"  form").mouseover(function()
		{
			mourseMoveObject.isCanSelect  = true;
		});
		$("#_newform_id"+i+"  form").mouseout(function()
		{
			mourseMoveObject.isCanSelect  = false;
		});
	}
	
	if(this.howCreateForm.isNewForm||this.howCreateForm.isModifyForm)
	{
		//var propsGrid = this.createPropsGrid(title,width,height);
		//Ext.getCmp('attrPanel').add(propsGrid);
		this.windowPanel.render();
	}
	if(this.howCreateForm.isNewForm)
		Ext.getCmp('_win').close(); //关闭创建表单对话框
	if(this.howCreateForm.isRedisplayForm)//表示回显页面 表单
	{
		return this["TabsPanel"];
	}
	if(this.howCreateForm.isModifyForm)//表示回显页面 表单
	{
		this.createFormItemByLoadTab(xmlValue,htmlEditorValue,"this.windowPanel");
	}
};
/**
 * 新建一个 form
 * @param title
 * @param width
 * @param height
 * @return
 */
PPdesinger.prototype.newForm = function (title, width, height,xmlValue,htmlEditorValue,whichOnetoRender) {
	var xmlDoc ;
	var formWidth = width;
	var formHeight = height;
	if(this.howCreateForm.isModifyForm||this.howCreateForm.isRedisplayForm)
	{
		
		xmlDoc = this.createXml(xmlValue);
		formHeight = parseInt(xmlDoc.getElementsByTagName("form")[0].getAttribute("formheight"));
		formWidth = parseInt(xmlDoc.getElementsByTagName("form")[0].getAttribute("formwidth"));
	}
	var form = new Ext.form.FormPanel({
		id :'_newform_id', //表单id
		title :title, //表单的title值根据输入的值
		frame :true,
		labelAlign :'right',
		labelWidth :'auto',
		//collapsible :true,
		plugins: new Ext.ux.CellFieldDropZone(this),
		autoScroll :true,
		layout :"absolute",
		defaultType :'textfield',
		width :formWidth, //表单的宽度
		height :formHeight  //表单的高度   
	});//form
	/**
	 * 初始化几个全局变量，数组中存放所有控件的属性   ----是否可以简化
	 */
	this.itemIdArr = [];
	this.itemTypeArr=[];
	this.itemIndex = 0;
	moveobjectcfz.maxLeft = width+10;
	moveobjectcfz.maxTop = height+10;
	form.tabSelectValue_ = "行方式";
	var myobject1 = this;
		
		if(this.howCreateForm.isNewForm||this.howCreateForm.isModifyForm)
		{
			var propsGrid = this.createPropsGrid(title,width,height);
			Ext.getCmp('attrPanel').add(propsGrid);
			Ext.getCmp("biaodangsheji").removeAll(); //清除上一次的表单。
			Ext.getCmp("biaodangsheji").add(form);
			this.windowPanel.render();
			$("#_newform_id  form").css("backgroundImage", "url('"+".."+"/ppdesinger/img/10.png')"); //设置背景颜色
			$("#_newform_id  form").css("backgroundColor", this.formColor);
			$("#_newform_id  form").mouseover(function()
			{
				mourseMoveObject.isCanSelect  = true;
			});
			$("#_newform_id  form").mouseout(function()
			{
				mourseMoveObject.isCanSelect  = false;
			});
			$("#_newform_id  form").mouseup(function(e){
				moveobjectcfz.now_Object.mouseUpRight(e,"form");
		     });
	}
	if(this.howCreateForm.isNewForm)
		Ext.getCmp('_win').close(); //关闭创建表单对话框
	if(this.howCreateForm.isRedisplayForm)//表示回显页面 表单
	{
		return form;
	}
	if(this.howCreateForm.isModifyForm)//表示回显页面 表单
	{
		this.createFormItemByLoad(xmlValue,htmlEditorValue,"this.windowPanel");
	}
};


PPdesinger.prototype.createFormItemByLoadTab = function(xmlValue,htmlEditorValue,whichOnetoRender)
{
	var xmlDoc = this.createXml(xmlValue);
	
	var tabShuzu = xmlDoc.getElementsByTagName("tabItem");
	for(var i=0;i<tabShuzu.length;i++)
	{
		Ext.getCmp("TabsPanel_cfz_pp").setActiveTab(i);
		var shuzu =  tabShuzu[i].getElementsByTagName("item");
		for(var j = 0;j<shuzu.length;j++)
		{
			this.itemIndex++;
			var i_type = shuzu[j].getAttribute("i_type");
			var objJons = {};
			for(var iValue in eval("this.allTypeItem."+i_type))
			{
				if("i_code"==iValue) this.itemTabIndex++;
				eval("objJons."+iValue+" = shuzu[j].getAttribute('"+iValue+"')");
			}
			this.createOtherItem_byclick(objJons,whichOnetoRender,true);
		}
	}
};

PPdesinger.prototype.createFormItemByLoad = function(xmlValue,htmlEditorValue,whichOnetoRender)
{
	var xmlDoc = this.createXml(xmlValue);
	var shuzu = xmlDoc.getElementsByTagName("item");
	for(var j = 0;j<shuzu.length;j++)
	{
		this.itemIndex++;
		var i_type = shuzu[j].getAttribute("i_type");
		var objJons = {};
		for(var iValue in eval("this.allTypeItem."+i_type))
		{
			if("i_code"==iValue) this.itemTabIndex++;
			eval("objJons."+iValue+" = shuzu[j].getAttribute('"+iValue+"')");
		}
		this.createOtherItem_byclick(objJons,whichOnetoRender,true);
	}
};




PPdesinger.prototype.createXml = function (str)
{ 
	if(document.all)
	{ 
		var xmlDom=new ActiveXObject("Microsoft.XMLDOM");
		xmlDom.loadXML(str);
		return xmlDom;
	} 
	else 
		return new DOMParser().parseFromString(str, "text/xml");
};

/**
 * 遇到 textfield numberfield 等要移动到一个div中去   
 * @param element   dom对象
 * @param itemtype  类型  textfield numberfield
 * @return
 */
PPdesinger.prototype.componentToDiv = function (element,itemtype) {
	
	var input_id_cfz  = "#"+element.id;
	var div_id_cfz1 = element.id+"_handle_id_cfz";
	var div_id_cfz = "#"+div_id_cfz1;
	$(input_id_cfz).after("<div id ='"+div_id_cfz1+"' itemttype='"+itemtype+"' ></div>"); 
	$(div_id_cfz).addClass('drsElement');
	
	$(div_id_cfz).attr("style",$(input_id_cfz).attr("style"));
	for(var i in eval("this.allTypeItem."+itemtype))
	{
		$(div_id_cfz).attr(i,$(input_id_cfz).attr(i));
	}
	
	/*
	Att_HtmlItemValue(div_id_cfz1,{
		style:$(input_id_cfz).attr('style'),
		ilength:$(input_id_cfz).attr("ilength"),
		i_accuracy:$(input_id_cfz).attr("i_accuracy"),
		i_negative:$(input_id_cfz).attr("i_negative"),
		i_readonly:$(input_id_cfz).attr("i_readonly"),
		tabindexnumber:$(input_id_cfz).attr("tabindexnumber"),
		cfzTabIndex:$(input_id_cfz).attr("cfzTabIndex"),
		hasFabu_Value:$(input_id_cfz).attr("hasFabu_Value"),
		i_unit_value:$(input_id_cfz).attr("i_unit_value"),
		is_i_unit_:$(input_id_cfz).attr("is_i_unit_"),
		i_default:$(input_id_cfz).attr("i_default"),
		i_desplaystyle:$(input_id_cfz).attr("i_desplaystyle"),
		i_allowblank:$(input_id_cfz).attr("i_allowblank"),
		i_code:$(input_id_cfz).attr("i_code"),
		i_label:$(input_id_cfz).attr("i_label"),
		i_data_type:$(input_id_cfz).attr("i_data_type"),
		i_label_hidden_value:$(input_id_cfz).attr('i_label_hidden_value')
	});
	*/
	$(div_id_cfz).css('overflow','visible');
	//$(input_id_cfz).attr('style','width:100%;height:100%;');
	$(input_id_cfz).css('width','100%');
	$(input_id_cfz).css('height','100%');
	$(input_id_cfz).removeClass('x-abs-layout-item');
	$(input_id_cfz).removeClass('drsElement');
	$(input_id_cfz).appendTo(div_id_cfz);
	element = document.getElementById(div_id_cfz1);
	return element;
};


/**
 * 选中控件时  修改 右边的属性栏
 * @return
 */

PPdesinger.prototype.selectAndModifyComponent = function () {
	var i_id = moveobjectcfz.element.id;
	Ext.getCmp("propsGrid_cfz").setTitle('组件属性');
	var i_type = $("#"+i_id).attr("i_type");
	var propsGrid_cfzJson = {};
	if(this.mulSelectItemId.length>1)
	{
		propsGrid_cfzJson.高度 = 0;
		propsGrid_cfzJson.宽度 = 0;
	}
	else
	{
		for(var i in eval("this.allTypeItem."+i_type))
		{
			//if(i=="i_id"||i=="i_type") continue;
			if(i=="i_type") continue;
			if(i_type!="label"&&i=="i_value")continue;
			if(i=="i_style")
			{
				var value = $("#"+i_id).attr(i);
				eval("var i_style_ = "+value);
				for(var itemss in i_style_)
				{
					if(itemss=="fontSize")  Ext.getCmp("fontSize_toolbar").setValue(i_style_[itemss]);
					//选中时 只改变  字号大小  其他的不变    变的话  效果不好
					/*
					//if(itemss=="fontWeight")  
					{
						if(i_style_[itemss]=="bold"||parseInt(i_style_[itemss])==700)
							Ext.getCmp("fontWeight_toolbar").setChecked(true);
						else
							Ext.getCmp("fontWeight_toolbar").setChecked(false);
					}
						
					if(itemss=="fontFamily")
					{
						if(i_style_[itemss]=="宋体")
							 Ext.getCmp("fontFamily_toolbar").getComponent(0).setChecked(true,true);
						 else if(i_style_[itemss]=="黑体")
							 Ext.getCmp("fontFamily_toolbar").getComponent(1).setChecked(true,true);
						 else if(i_style_[itemss]=="楷体")
							 Ext.getCmp("fontFamily_toolbar").getComponent(2).setChecked(true,true);
						 else if(i_style_[itemss]=="Arial")
							 Ext.getCmp("fontFamily_toolbar").getComponent(3).setChecked(true,true);
					}*/
				}
			}
			else
			{
				var name = eval("this.allItemProperty.en_ch."+i);
				var value = $("#"+i_id).attr(i);
				eval("propsGrid_cfzJson."+name+"='"+value+"'");
			}
			
		}
	}
	
	Ext.getCmp("propsGrid_cfz").setSource(propsGrid_cfzJson);
};




PPdesinger.prototype.JsonToString = function (jsonObject)
{
	var jsonString = "{";
	for(var item in jsonObject){
		var itemvalue = eval("jsonObject."+item);
		if(typeof(itemvalue)=="object")
			jsonString =jsonString +item +":"+ JsonToString(itemvalue)+",";
		else
		jsonString=jsonString+item+':"'+(eval("jsonObject."+item))+"\",";
		
	}
	if(jsonString.charAt(jsonString.length-1)==',')
		jsonString = jsonString.substring(0,jsonString.length-1);
	jsonString+="}";
	return jsonString;
};

PPdesinger.prototype.StringToJson = function (stringValue)
{
	eval("var theJsonValue = "+stringValue);
	return theJsonValue;
};


PPdesinger.prototype.xml2Str = function (xmlNode)
{
  try {
    // Gecko-based browsers, Safari, Opera.
    return (new XMLSerializer()).serializeToString(xmlNode);
  }
  catch (e) {
    try {
      // Internet Explorer.
      return xmlNode.xml;
    }
    catch (e)
    {//Strange Browser ??
     alert('Xmlserializer not supported');
    }
  }
  return false;
};

PPdesinger.prototype.openFormWindow = function()
{
	 var fibasic = new Ext.ux.form.FileUploadField({
		 	id:"dfdasfsfasf",
	        width: 200
	    });
	 var button_ =  new Ext.Button({
	        text: '确定',
	        handler: function(){
	            var v = fibasic.getValue();
	            alert(v);
	        }
	    });

	var fileUpWindow =  new Ext.Window({
		title: '浏览文件',
      	width: 220,
      	height: 100,
      	id: "fileUpWindow",
      	items:[fibasic,button_]
   	});
	fileUpWindow.show();
};

PPdesinger.prototype.LocalFormWindow = function(obj)
{
	var textarea_local = new Ext.form.TextArea({
		width:900,
		height:400
	});
	
	var fileUpWindow =  new Ext.Window({
		title: 'xml值',
      	width: 900,
      	height: 500,
      	items:[textarea_local]
   	});
	if(obj=="open")
	{
		 var button_ =  new Ext.Button({
		        text: '确定',
		        width:100,
		        height:24,
		        handler: function(){
		            var v = textarea_local.getValue();
		            if(moveobjectcfz.now_Object.useFormTab.flag)
		            	moveobjectcfz.now_Object.newTabForm("title",1111,777,0,v,"dfdf");
		            else
		            {
		            	moveobjectcfz.now_Object.howCreateForm = {
		    				isNewForm:false,
		    				isRedisplayForm:false,
		    				isModifyForm:true	//true,表示进入修改页面
		    			};
		            	Ext.getCmp('attrPanel').removeAll();
		            	moveobjectcfz.now_Object.newForm("title",1111,777,v);
		            }
		            fileUpWindow.close();
		        }
		    });
		 fileUpWindow.add(button_);
		 fileUpWindow.show();
	}
	if(obj=="save")
	{
		var all_getAllItemData = '<?xml version="1.0" encoding="UTF-8"?>'+moveobjectcfz.now_Object.getAllItemData();
		textarea_local.setValue(all_getAllItemData);
		fileUpWindow.show();
	}
	if(obj=="goto")
	{
		var all_getAllItemData = '<?xml version="1.0" encoding="UTF-8"?>'+moveobjectcfz.now_Object.getAllItemData();

		window.saveXmlValue = all_getAllItemData;
		var OpenWindow = window.open("ppdesinger_redisplay1.html");
		//OpenWindow.myxmlValue = all_getAllItemData;

		//var dialogpro = "dialogWidth="+1000+"px;dialogHeight="+700+"px";
	    //window.showModalDialog("./ppdesinger_redisplay1.html",window,dialogpro)
	}
	
};
PPdesinger.prototype.mouseUpRight = function(e,which,id)
{
	if (e.button == 2) 
	{
		
		var mouseX = e.pageX || e.clientX + document.documentElement.scrollLeft;
		var mouseY = e.pageY || e.clientY + document.documentElement.scrollTop;
		var clientXYvalue = new Array(mouseX, mouseY);
		if(which=="item")
		{
			moveobjectcfz.now_Object.contextMenuId = id;
			if(moveobjectcfz.now_Object.mulSelectItemId.length==0)
				moveobjectcfz.select(document.getElementById(id),null,e);
			Ext.getCmp("theContextMenu").showAt(clientXYvalue);
		}
		if(which=="form")
		{
			if(Ext.getCmp("theContextMenu").isVisible()==false)
				Ext.getCmp("theformContextMenu").showAt(clientXYvalue);
		}
			
	}
};


PPdesinger.prototype.showSelectBox = function(iid_)
{
	var item = Ext.data.Record.create([ 
	       {name: 'name', type: 'string'},
	       {name: 'value', type: 'string'}
	       
	  ]); 
	
	var sm = new Ext.grid.CheckboxSelectionModel(); 
	var voucolM = new Ext.grid.ColumnModel([ 
	    sm, 
	    {header: " <center>名称</center>", dataIndex: "name", align: "left",width:180,editor: new Ext.form.TextField({allowBlank: false})},
	    {header: " <center>显示值</center>", dataIndex: "value", align: "left",width:180,editor: new Ext.form.TextField({allowBlank: false})}
	    ]); 
		 		
	var myStore = new Ext.data.ArrayStore({
        fields: [
            {name: 'name', type: 'string'},
			{name: 'value', type: 'string'}
        ]
    });    
	
	var allItems = jQuery("#"+iid_).attr("i_items");
	allItems = eval(allItems);
	for(var i=0;i<allItems.length;i++)
	{
		var n = myStore.getCount();// 获得总行数 
		 var p = new item({ 
			 'name':allItems[i].name,
         	'value':allItems[i].boxLabel
         }); 
		myStore.insert(n, p);
	}
	
	var gridFOMR1 = new Ext.grid.EditorGridPanel({
		id:'gridform1',
        cm: voucolM,
        sm: sm,
        store: myStore,
        enableHdMenu:false,
		tbar:[{
	            text:'新增选项',
	            tooltip:'新增选项',
	            iconCls:'add',
	            handler: function(e, target, panel){
		 			//点击事件 ,新增一条记录
		 		    var n = gridFOMR1.getStore().getCount();// 获得总行数 
		 		    var ii = n +1;
	                var p = new item({ 
	                	'name':'',
	                	'value':''
	                }); 
	                gridFOMR1.stopEditing();// 停止编辑 
	                gridFOMR1.getStore().insert(n, p);// 插入到最后一行 
	                gridFOMR1.startEditing(n, 1);// 开始编辑1单元格 
		 		}
          },{
	            text:'删除选项',
	            tooltip:'删除选项',
	            iconCls:'delete',
	            handler: function(e, target, panel){
		 			//点击事件 ,删除选中的记录
		 			//var record = grid.getSelectionModel().getSelected();// 返回值为 Record 类型 
	                var rows = gridFOMR1.getSelectionModel().getSelections();// 返回值为 Record 数组 
		 			if(rows.length==0){ 
		 				Ext.MessageBox.alert('警告', '最少选择一条信息，进行删除!'); 
		 			}else{ 
		 				Ext.MessageBox.confirm('提示框', '您确定要进行该操作？',function(btn){ 
				 			if(btn=='yes'){ 
					 			if(rows){ 
						 			for (var i = 0; i < rows.length; i++) { 
							 			//alert(rows[i].get("name")); 
							 			gridFOMR1.getStore().remove(rows[i]); 
							 			//store.removeAll(); //删除所有数据 
						 			} 
					 			} 
				 			} 
		 				});					 			
	 				}//else
      			} //handler              
          }],
		 isForceFit:true,
		 isEdit:true,
		 width:400,
		 height:400
 	});
	var checkBoxWindow =  new Ext.Window({
		title: '下拉选项',
      	width: 400,
      	height: 500,
      	modal:true,
      	items:[gridFOMR1]
   	});
	var button_ =  new Ext.Button({
        text: '确定',
        width:100,
        height:24,
        handler: function(){
			var iid_ = jQuery("#"+moveobjectcfz.element.id+"  input").attr("i_id");
			 Ext.getCmp(iid_).getStore().removeAll();
			 var objeJsonArr = "[";
			 for(var i=0;i<gridFOMR1.getStore().data.length;i++)
			{
				var record  =  gridFOMR1.getStore().getAt(i).data;
				var itemjson = {};
				for(var ii in record)
				{
					if(ii=="name")
					{
						itemjson.name = record[ii];
					}
					if(ii=="value")
					{
						
						itemjson.boxLabel = record[ii];
						
					}
					if(ii=="length")
						itemjson.columnWidth = record[ii];
				}
				objeJsonArr = objeJsonArr + moveobjectcfz.now_Object.JsonToString(itemjson)+",";
				var n = Ext.getCmp(iid_).getStore().getCount();// 获得总行数 
				var p = new item(itemjson); 
				Ext.getCmp(iid_).getStore().insert(n, p);
			}
			 if(objeJsonArr!="[")
				 objeJsonArr = objeJsonArr.substring(0,objeJsonArr.length-1)+"]";
			 else objeJsonArr = objeJsonArr +"]";
			 jQuery("#"+iid_).attr("i_items",objeJsonArr);
			 jQuery("#"+moveobjectcfz.element.id).attr("i_items",objeJsonArr);
			checkBoxWindow.close();
        }
    });
	checkBoxWindow.add(button_);
	checkBoxWindow.show();
	
}


PPdesinger.prototype.showCheckBoxRadioBox = function(iid_)
{
	var item = Ext.data.Record.create([ 
           {name: 'value', type: 'string'},
           {name: 'length', type: 'string'}
      ]); 
      
	//myStore.loadData(myData);
	var sm = new Ext.grid.CheckboxSelectionModel(); 
	var voucolM = new Ext.grid.ColumnModel([ 
	    sm, 
	    {header: " <center>显示值</center>", dataIndex: "value", align: "left",width:180,editor: new Ext.form.TextField({allowBlank: false})},
	    {header: " <center>宽度</center>", dataIndex: "length", align: "left",width:80,editor: new Ext.form.TextField({allowBlank: false})}
	    ]); 
		 		
	var myStore = new Ext.data.ArrayStore({
        fields: [
			{name: 'value', type: 'string'},
			{name: 'length', type: 'string'}
        ]
    });
	
	for(var i=0;i<Ext.getCmp(iid_).items.length;i++)
	{
		var n = myStore.getCount();// 获得总行数 
		 var p = new item({ 
         	'value':Ext.getCmp(iid_).get(i).boxLabel,
         	'length':Ext.getCmp(iid_).get(i).columnWidth
         }); 
		myStore.insert(n, p);
	}
	
	var gridFOMR = new Ext.grid.EditorGridPanel({
		id:'gridform',
        cm: voucolM,
        sm: sm,
        store: myStore,
        enableHdMenu:false,
		tbar:[{
	            text:'新增选项',
	            tooltip:'新增选项',
	            iconCls:'add',
	            handler: function(e, target, panel){
		 			//点击事件 ,新增一条记录
		 		    var n = gridFOMR.getStore().getCount();// 获得总行数 
		 		    var ii = n +1;
	                var p = new item({ 
	                	'value':'',
	                	'length':''
	                }); 
	                gridFOMR.stopEditing();// 停止编辑 
	                gridFOMR.getStore().insert(n, p);// 插入到最后一行 
	                gridFOMR.startEditing(n, 1);// 开始编辑1单元格 
		 		}
          },{
	            text:'删除选项',
	            tooltip:'删除选项',
	            iconCls:'delete',
	            handler: function(e, target, panel){
		 			//点击事件 ,删除选中的记录
		 			//var record = grid.getSelectionModel().getSelected();// 返回值为 Record 类型 
	                var rows = gridFOMR.getSelectionModel().getSelections();// 返回值为 Record 数组 
		 			if(rows.length==0){ 
		 				Ext.MessageBox.alert('警告', '最少选择一条信息，进行删除!'); 
		 			}else{ 
		 				Ext.MessageBox.confirm('提示框', '您确定要进行该操作？',function(btn){ 
				 			if(btn=='yes'){ 
					 			if(rows){ 
						 			for (var i = 0; i < rows.length; i++) { 
							 			//alert(rows[i].get("name")); 
							 			gridFOMR.getStore().remove(rows[i]); 
							 			//store.removeAll(); //删除所有数据 
						 			} 
					 			} 
				 			} 
		 				});					 			
	 				}//else
      			} //handler              
          }],
		 isForceFit:true,
		 isEdit:true,
		 width:400,
		 height:400
 	});
	var checkBoxWindow =  new Ext.Window({
		title: 'lajfdalsjf',
      	width: 400,
      	height: 500,
      	modal:true,
      	items:[gridFOMR]
   	});
	var button_ =  new Ext.Button({
        text: '确定',
        width:100,
        height:24,
        handler: function(){
			var iid_ = (moveobjectcfz.element.id);
			Ext.getCmp(iid_).removeAll();
			for(var i=0;i<gridFOMR.getStore().data.length;i++)
			{
				var record  =  gridFOMR.getStore().getAt(i).data;
				var itemjson = {};
				for(var ii in record)
				{
					if(ii=="key")
					{
						itemjson.name = record[ii];
					}
					if(ii=="value")
						itemjson.boxLabel = record[ii];
					if(ii=="length")
						itemjson.columnWidth = record[ii];
				}
				Ext.getCmp(iid_).add(itemjson);
				moveobjectcfz.now_Object.windowPanel.render();
			}
			checkBoxWindow.close();
        }
    });
	checkBoxWindow.add(button_);
	checkBoxWindow.show();
	
};

PPdesinger.prototype.showFunctionWindow = function(iid_)
{
	var textarea_local11 = new Ext.form.TextArea({
		width:600,
		height:330,
		region:'center',
		value:$("#"+iid_).attr("i_function")
	});
	var allIdTreeNameArr_ = [];
	for(var kkk = 0;kkk<moveobjectcfz.now_Object.itemIdArr.length;kkk++)
	{
		var jjson = {text:moveobjectcfz.now_Object.itemIdArr[kkk],length:50,leaf:true};
		allIdTreeNameArr_.push(jjson);
	}
	var allIdTreeName = new Ext.tree.TreePanel({
		id:'allIdTreeName_cc',
		useArrows: true,
	    autoScroll: true,
	    region:'west',
	    animate:false,//是否动画   
        containerScroll: true,
        border: false,
        width:100,
        root: {
        nodeType: 'async',
        text: '图片',
        draggable: false,
        id: 'null',
        icon:'../img/form.png',
        children:allIdTreeNameArr_
    	},
    	rootVisible:false
    });


	
	
	
	var checkBoxWindow =  new Ext.Window({
		title: 'lajfdalsjf',
      	width: 600,
      	height: 400,
      	modal:true,
      	layout:"border",
      	items:[textarea_local11,allIdTreeName]
   	});
	var button_ =  new Ext.Button({
        text: '确定',
        width:100,
        height:24,
        region:'south',
        handler: function(){
			var iid_ = (moveobjectcfz.element.id);
			$("#"+iid_).attr("i_function",textarea_local11.getValue());
			//Ext.getCmp(iid_).setHandler(function(){eval(textarea_local11.getValue())});
			checkBoxWindow.close();
        }
    });
	checkBoxWindow.add(button_);
	checkBoxWindow.show();
};

PPdesinger.prototype.createPropsGrid = function (title,width,height)
{
	var propsGrid = new Ext.grid.PropertyGrid({
		width: 200,
		id:"propsGrid_cfz",
		height:height,
		title: '表单属性',
		border :false,
		source: {
		    '表单名称': title,
		    '表单高度': height,
		    '表单宽度': width,
		    'tab顺序方式':"行方式"
		},
		viewConfig : {
		    forceFit: true,
		    scrollOffset: 2 
		},
        listeners:{
			'propertychange':function(source,recordId,value,oldValue)
			{
				recordId = recordId.trim();
				var  formId_Tab_no = "_newform_id";
				if(moveobjectcfz.now_Object.useFormTab.flag)
					formId_Tab_no = (Ext.getCmp("TabsPanel_cfz_pp").getActiveTab().get(0).getId());
				if(propsGrid.title=='表单属性')
				{
					if(!moveobjectcfz.now_Object.hasCreateForm())
						return;
					if(recordId=="表单名称")
					{
						Ext.getCmp(formId_Tab_no).setTitle(value);
						moveobjectcfz.now_Object.windowPanel.render();
					}
					if(recordId=="表单宽度")
					{
						Ext.getCmp(formId_Tab_no).setWidth(value);
						Ext.getCmp(formId_Tab_no).width_ = value;
						moveobjectcfz.maxLeft = value;
						moveobjectcfz.now_Object.windowPanel.render();
						if(moveobjectcfz.now_Object.is_show_bc)
						{
						$("#"+formId_Tab_no+"  form").css('width',value-28);
						$("#biaochi_y").css('height',Ext.getCmp(formId_Tab_no).getHeight-37);
						}
					}	
					if(recordId=="表单高度")
					{
						Ext.getCmp(formId_Tab_no).setHeight(value);
						Ext.getCmp(formId_Tab_no).height_=value;
						moveobjectcfz.maxTop = value;
						moveobjectcfz.now_Object.windowPanel.render();
						if(moveobjectcfz.now_Object.is_show_bc)
						{
							$("#"+formId_Tab_no+"  form").css('width',form.getWidth()-28);
							$("#biaochi_y").css('height',value-37);
						}
					}
					if(recordId=="tab顺序方式")
					{
						Ext.getCmp(formId_Tab_no).tabSelectValue_ = value;
					}
				}
				
				else
				{
					if(moveobjectcfz.now_Object.mulSelectItemId.length>1)
					{
						for(var kk=0;kk<moveobjectcfz.now_Object.mulSelectItemId.length;kk++)
						{
							var i_id = moveobjectcfz.now_Object.mulSelectItemId[kk];
							var i_type = $("#"+i_id).attr("i_type");
							var useType = eval("moveobjectcfz.now_Object.allItemProperty.useType."+i_type);
							value = parseInt(value);
							if(recordId=="高度")
        	    			{
								moveobjectcfz.elmH =  parseInt(value);
								switch(useType)
								{
									case "textareaDiv":
										i_id = $("#"+i_id+ " textarea").attr("id");
										Ext.getCmp(i_id).setHeight(value);
	    								$("#"+i_id).attr("i_heigth",value);
	    								break;
									case "inputDiv":
										$("#"+i_id).attr("i_heigth",value);
										i_id = $("#"+i_id+ " input").attr("id");
										Ext.getCmp(i_id).setHeight(value);
	    								$("#"+i_id).attr("i_heigth",value);
	    								break;
									case "ceateDivinput":
										$("#"+i_id).css("height",value);
	    								$("#"+i_id).attr("i_heigth",value);
	    								$("#"+i_id+" input").attr("i_heigth",value);
	    								break;
									case "ceateDivtextarea":
										$("#"+i_id).css("height",value);
	    								$("#"+i_id).attr("i_heigth",value);
	    								$("#"+i_id+" input").attr("i_heigth",value);
	    								break;
	    							default:
	    								$("#"+i_id).css("height",value);
    									$("#"+i_id).attr("i_heigth",value);
	    								break;
								}
        	    			}
							if(recordId=="宽度")
        	    			{
								moveobjectcfz.elmW =  parseInt(value);
								switch(useType)
								{
									case "textareaDiv":
										$("#"+i_id).attr("i_width",value);
										i_id = $("#"+i_id+ " textarea").attr("id");
										Ext.getCmp(i_id).setWidth(value);
	    								$("#"+i_id).attr("i_width",value);
	    								break;
									case "inputDiv":
										$("#"+i_id).attr("i_width",value);
										i_id = $("#"+i_id+ " input").attr("id");
										Ext.getCmp(i_id).setWidth(value);
	    								$("#"+i_id).attr("i_width",value);
	    								break;
									case "ceateDivinput":
										$("#"+i_id).css("width",value);
	    								$("#"+i_id).attr("i_width",value);
	    								$("#"+i_id+" input").attr("i_width",value);
	    								break;
									case "ceateDivtextarea":
										$("#"+i_id).css("width",value);
	    								$("#"+i_id).attr("i_width",value);
	    								$("#"+i_id+" input").attr("i_width",value);
	    								break;
	    							default:
	    								$("#"+i_id).css("width",value);
    									$("#"+i_id).attr("i_width",value);
	    								break;
								}
        	    			}
						}
					}
					else
					{
						var i_id = moveobjectcfz.element.id;						//得到移动对象的id
						var i_type = $("#"+i_id).attr("i_type");					//得到移动对象的type
						var useType = eval("moveobjectcfz.now_Object.allItemProperty.useType."+i_type);
						for(var chname in moveobjectcfz.now_Object.allItemProperty.ch_en)			//遍历属性中文名
						{
							if(recordId==chname)
							{
								var att_value = eval("moveobjectcfz.now_Object.allItemProperty.ch_en."+chname);
								switch(useType)
								{
									case "textareaDiv":
									case "inputDiv":
										$("#"+i_id).attr(att_value,value);
										if(useType == "textareaDiv" )
											i_id = $("#"+i_id+ " textarea").attr("id");
										if(useType == "inputDiv" )
											i_id = $("#"+i_id+ " input").attr("id");
										if(att_value=="i_width")
										{
											
											Ext.getCmp(i_id).setWidth(parseInt(value));
											moveobjectcfz.elmW = parseInt(value);
										}
										if(att_value=="i_height")
										{
											Ext.getCmp(i_id).setHeight(parseInt(value));
											moveobjectcfz.elmH = parseInt(value);
										}
										if(att_value=="i_x")
										{
											Ext.getCmp(i_id).setPosition(parseInt(value),Ext.getCmp(i_id).getPosition(true)[1]);
											moveobjectcfz.elmX = parseInt(value);
										}
										if(att_value=="i_y")
										{
											Ext.getCmp(i_id).setPosition(Ext.getCmp(i_id).getPosition(true)[0],parseInt(value));
											moveobjectcfz.elmY = parseInt(value);
										}
										$("#"+i_id).attr(att_value,value);
										break;
									case "selfCss":
									case "self":
									case "selfColor":
									case "ceateDivinput":
									case "ceateDivtextarea":
										$("#"+i_id).attr(att_value,value);
										if(att_value=="i_width")
										{
											if(i_type=="liney")
												document.getElementById(i_id).style.borderLeftWidth = parseInt(value);
											else
												document.getElementById(i_id).style.width = parseInt(value);
											moveobjectcfz.elmW = parseInt(value);
										}
										if(att_value=="i_height")
										{
											if(i_type=="linex")
												document.getElementById(i_id).style.borderTopWidth = parseInt(value);
											else
												document.getElementById(i_id).style.height = parseInt(value);
											moveobjectcfz.elmH = parseInt(value);
										}
										if(att_value=="i_x")
										{
											document.getElementById(i_id).style.left = parseInt(value);
											moveobjectcfz.elmX = parseInt(value);
										}
										if(att_value=="i_y")
										{
											document.getElementById(i_id).style.top = parseInt(value);
											moveobjectcfz.elmY = parseInt(value);
										}
										if(att_value=="i_value")
										{
											if(useType=="selfCss")
											{
												var bb = value;
												var temp = ($("#"+i_id).children("div"));
												bb = bb.replace(/\s/ig,"&nbsp;");
												$("#"+i_id).html(bb);
												$("#"+i_id).attr("i_value",bb);
												temp.appendTo("#"+i_id);
											}
												
											if("ceateDivinput"==useType)
											{
												i_id = $("#"+i_id+ " input").attr("id");
												Ext.getCmp(i_id).setValue(value);
											}
											if("ceateDivtextarea"==useType)
											{
												i_id = $("#"+i_id+ " textarea").attr("id");
												Ext.getCmp(i_id).setValue(value);
											}
										}
										break;
									case "button":
									case "noId":
										$("#"+i_id).attr(att_value,value);
										if(att_value=="i_width")
										{
											Ext.getCmp(i_id).setWidth(parseInt(value));
											moveobjectcfz.elmW = parseInt(value);
										}
										if(att_value=="i_height")
										{
											Ext.getCmp(i_id).setHeight(parseInt(value));
											moveobjectcfz.elmH = parseInt(value);
										}
										if(att_value=="i_x")
										{
											Ext.getCmp(i_id).setPosition(parseInt(value),Ext.getCmp(i_id).getPosition(true)[1]);
											moveobjectcfz.elmX = parseInt(value);
										}
										if(att_value=="i_y")
										{
											Ext.getCmp(i_id).setPosition(Ext.getCmp(i_id).getPosition(true)[0],parseInt(value));
											moveobjectcfz.elmY = parseInt(value);
										}
										if("i_items"==att_value)
										{
										}
										if("i_code"==att_value)
										{
										}
										if("i_text"==att_value)
										{
											Ext.getCmp(i_id).setText(value);
										}
										break;
									default:
										break;
											
								}
							}
						}
					}
					
				}
			}
		} //listeners 
		
	});
		
		propsGrid.customEditors = {
					'tab顺序方式':new Ext.grid.GridEditor(new Ext.form.ComboBox({
					    name        : 'tabShunxXu',
					    id			:'tabShunxXuId',
			            allowBlank     : false,
			            store        : ['行方式', '列方式','手动输入'],
			            typeAhead    : true,
					    mode        : 'local',
					    triggerAction    : 'all',
					    selectOnFocus    :true
					   })),
			        'label名称' : new Ext.grid.GridEditor(new Ext.form.TextField({
			        	disabled:true,       
			        	disabledClass:""     
			        })),
			        'id' : new Ext.grid.GridEditor(new Ext.form.TextField({
			        	disabled:true,       
			        	disabledClass:""     
			        })),
			        '类型' : new Ext.grid.GridEditor(new Ext.form.TextField({
			        	disabled:true,       
			        	disabledClass:""     
			        })),
			        '元素':new Ext.grid.GridEditor(new Ext.form.TextField({
			        	//disabled:true,       
			        	//disabledClass:""     
			        	listeners :{"focus":function(a)
			        					{
			        						var iid_ = (moveobjectcfz.element.id);
											if(jQuery("#"+iid_).attr("i_type")=="select")
											{
												alert(9);
			        							moveobjectcfz.now_Object.showSelectBox(iid_);
											}
											else

			        	 						moveobjectcfz.now_Object.showCheckBoxRadioBox(iid_);
			        					}
			        				}
			        })),
			        '方法':new Ext.grid.GridEditor(new Ext.form.TextField({
			        	listeners :{"focus":function(a)
			        					{
			        						var iid_ = (moveobjectcfz.element.id);
			        	 					//moveobjectcfz.now_Object.showCheckBoxRadioBox(iid_);
			        						moveobjectcfz.now_Object.showFunctionWindow(iid_);
			        					}
			        				}
			        })),
			        '允许为空' : new Ext.grid.GridEditor(new Ext.form.ComboBox({
			        	name        : 'empty',
			            allowBlank     : false,
			            store        : ['true','false'],
			            typeAhead    : true,
					    mode        : 'local',
					    triggerAction    : 'all',
					    selectOnFocus    :true
			        })),
			        '是否只读' : new Ext.grid.GridEditor(new Ext.form.ComboBox({
			        	name        : 'readonly',
			            allowBlank     : false,
			            store        : [['true','true'],['false','false']],
			            typeAhead    : true,
					    mode        : 'local',
					    triggerAction    : 'all',
					    selectOnFocus    :true
			        })),
			        '显示样式' : new Ext.grid.GridEditor(new Ext.form.ComboBox({
					    name        : 'display',
			            allowBlank     : false,
			            store        : ['下划线', '方框'],
			            typeAhead    : true,
					    mode        : 'local',
					    triggerAction    : 'all',
					    selectOnFocus    :true
					   }))
			        
		};
		return propsGrid;
};